﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;

namespace mhxp
{
	[StructLayout(LayoutKind.Sequential)]
	public struct HsHeader
	{
		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
		public byte[] hdr;
		public ushort version;
		public ushort revision;
		public ulong timestamp;
	}

	[StructLayout(LayoutKind.Sequential)]
	public struct HsTail
	{
		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
		public byte[] hdr;
		public ushort version;
		public ushort revision;
	}

	[StructLayout(LayoutKind.Sequential)]
	public struct HsItem
	{
		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
		public byte[] hdr;
		public ushort type;
		public ushort version;
		public uint length;
		public uint reserved;
	}

	[StructLayout(LayoutKind.Sequential)]
	public struct HxpHeader
	{
		public uint count;
		public int insts;
		public ushort framepersecond;
		public ushort width;
		public ushort height;
		public ushort bpp;

		// 그 다음은 int size[count]
	}
}
